project(vvxfce4-power-manager-settings)
#bin_PROGRAMS = xfce4-power-manager-settings
#

set(xfce4_power_manager_settings_SOURCES
        xfce-power-manager-dbus.h
        xfce-power-manager-dbus.c
        xfpm-settings-main.c
        xfpm-settings-app.c
        xfpm-settings-app.h
        xfpm-settings.c
        xfpm-settings.h
        # $(top_srcdir)/common/xfpm-config.h
        # $(top_srcdir)/common/xfpm-enum.h
        # $(top_srcdir)/common/xfpm-enum-glib.h
)

add_executable(${PROJECT_NAME}
        ${xfce4_power_manager_settings_SOURCES}
)

target_link_libraries(${PROJECT_NAME}
        PRIVATE
        vvxpm-common
        vvxpm-libdbus
        src_a
        # PkgConfig::GMODULE
        PkgConfig::GTK
        PkgConfig::GLIB
        PkgConfig::GIO
        PkgConfig::GIO_UNIX
        PkgConfig::GTHREAD
        PkgConfig::GMODULE
        PkgConfig::DBUS
        PkgConfig::DBUS_GLIB
        PkgConfig::XFCE4_UI
        PkgConfig::XFCE4_UTIL
        PkgConfig::XFCONF
        PkgConfig::UPOWER_GLIB
)

target_include_directories(${PROJECT_NAME}
        PRIVATE
        ../data
)

target_compile_definitions(${PROJECT_NAME}
        PRIVATE
        LOCALEDIR="${CMAKE_INSTALL_PREFIX}/share/locale"
        G_LOG_DOMAIN="vvxfce4-power-manager-settings"
        XFPM_VERSION_SHORT="4.18"

)


#xfce4_power_manager_settings_LDFLAGS = -export-dynamic
#
#
#manpagedir = $(mandir)/man1
#
#manpage_DATA = xfce4-power-manager-settings.1
#
#if MAINTAINER_MODE
#
#BUILT_SOURCES = 			\
#	xfce-power-manager-dbus.c	\
#	xfce-power-manager-dbus.h
#
#xfce-power-manager-dbus.c xfce-power-manager-dbus.h: $(top_srcdir)/src/org.xfce.Power.Manager.xml
#	gdbus-codegen --interface-prefix=org.xfce. --c-namespace=Xfpm --generate-c-code=xfce-power-manager-dbus $<
#
#endif
#
##
## .desktop file
##
#desktop_in_files = xfce4-power-manager-settings.desktop.in
#desktopdir = $(datadir)/applications
#desktop_DATA =	$(desktop_in_files:.desktop.in=.desktop)
#
#@INTLTOOL_DESKTOP_RULE@
#
#EXTRA_DIST = 					\
#	$(desktop_in_files)			\
#	$(manpage_DATA)
#
#DISTCLEANFILES =				\
#	$(BUILT_SOURCES)			\
#	$(desktop_DATA)
